<link rel="stylesheet" href="/assets/home/css/profile.css" />
<!-- 引入城市插件 -->
<link rel="stylesheet" href="/assets/home/city/css/city-picker.css" />
<script src="/assets/home/city/js/city-picker.data.min.js"></script>
<script src="/assets/home/city/js/city-picker.min.js"></script>

<style>
    .form .item {
        padding: 13px 0;
    }

    .user {
        padding: 30px;
    }
</style>


<body>
    <!-- 头部 -->
    <div class="top_div">
        <img src="/assets/home/images/bac.jpg" class="top_img">
        <div class="userInfo">
            <a href="javascript:void(0)">
                <img class="uPic" src="{$LoginAuth.avatar_text}" />
                <br />
            </a>
            <br />
            <p class="uBalance" style="color:rgb(74, 70, 66);">
                {if condition="$LoginAuth.nickname"}
                {$LoginAuth.nickname}
                {else /}
                {$LoginAuth.mobile_text}
                {/if}
            </p>
        </div>
    </div>

    <div class="form">
        <form method="post" enctype="multipart/form-data">
            <div class="item">
                <div class="title" style="text-align: left;">
                    手机号：
                </div>
                <input type="text" value="{$LoginAuth.mobile}" disabled />
            </div>

            <div class="item">
                <div class="title" style="text-align: left;">
                    昵称：
                </div>
                <input type="text" name="nickname" placeholder="请输入昵称" required value="{$LoginAuth.nickname}" />
            </div>

            <div class="item">
                <div class="title" style="text-align: left;">
                    邮箱：
                </div>
                <input type="text" name="email" placeholder="请输入邮箱" required value="{$LoginAuth.email}" />
            </div>

            <div class="item">
                <div class="title" style="text-align: left;">
                    密码：
                </div>
                <input type="password" name="password" placeholder="为空不修改密码" />
            </div>

            <div class="item">
                <div class="title" style="text-align: left;">
                    性别：
                </div>
                <select name="gender">
                    <option {$LoginAuth.gender==0 ? 'selected' : '' } value="0">保密</option>
                    <option {$LoginAuth.gender==1 ? 'selected' : '' } value="1">男</option>
                    <option {$LoginAuth.gender==2 ? 'selected' : '' } value="2">女</option>
                </select>
            </div>

            <div class="item">
                <div class="title" style="text-align: left;">
                    邀请码：
                </div>
                <input type="text" value="{$LoginAuth.invitecode}" disabled />
            </div>

            <div class="item" style="position: relative;">
                <div class="title" style="text-align: left;">
                    地区：
                </div>
                <input id="city" type="text" name="region" readonly data-toggle="city-picker" size="100" />
            </div>

            <div class="item">
                <div class="title" style="text-align: left;">
                    头像：
                </div>

                <input type="file" id="file" name="avatar" style="display: none;" />

                <img style="width: 100px;height: 100px;" src="{$LoginAuth.avatar_text}" onclick="file.click()" />
            </div>

            <input type="submit" value="修改资料" style="background-color: #674c3b; color: white;">
        </form>
    </div>
</body>

<script>
    // 给城市信息做初始化
    $("#city").citypicker({
        province: '{$LoginAuth.province_text}',
        city: '{$LoginAuth.city_text}',
        district: '{$LoginAuth.district_text}'
    })
</script>